import request from '@/utils/request'

// 查询列表信息
export function getChapterList(query) {
  return request({
    url: '/yijing/chapter/list',
    method: 'get',
    params: query
  })
}

// 查询详细
export function chapterDetail(chapterId) {
  return request({
    url: '/yijing/chapter/' + chapterId,
    method: 'get'
  })
}


// 新增
export function addChapter(data) {
  return request({
    url: '/yijing/chapter',
    method: 'post',
    data: data
  })
}

// 修改
export function updateChapter(data) {
  return request({
    url: '/yijing/chapter',
    method: 'put',
    data: data
  })
}

// 删除
export function delChapter(chapterId) {
  return request({
    url: '/yijing/chapter/' + chapterId,
    method: 'delete'
  })
}